import {
  HTTP
}
  from '../utils/http.js'

class ReportModel extends HTTP {
  login(data) {
    return this.request({
      url: '/api/login',
      method: 'POST',
      data: data
    })
  }
  getNumber(data) {
    return this.request({
      url: '/api/getNumber',
      method: 'POST',
      data: data
    })
  }
  store(data) {
    return this.request({
      url: '/api/report/store',
      method: 'POST',
      data: data
    })
  }
  getTowns(){
    return this.request({
      url: '/api/report/towns',
    })
  }
  getVillages(id) {
    return this.request({
      url: `/api/report/villages/${id}`,
    })
  }  
  getAds() {
    return this.request({
      url: `/api/report/ads`,
    })
  }
  getCate() {
    return this.request({
      url: `/api/report/cate`,
    })
  }  
  getArticles(id){
    return this.request({
      url: `/api/report/articles/${id}`,
    })
  }
  getArticleList(id,page=1) {
    return this.request({
      url: `/api/report/articleList/${id}?page=${page}`,
    })
  }
  getArea() {
    return this.request({
      url: `/api/area/index`,
    })
  }
  getAreaById(id){
    return this.request({
      url: `/api/area/list/${id}`,
    })
  }
  getTab(type) {
    return this.request({
      url: `/api/area/tab/${type}`,
    })
  }
  sendCode(mobile){
    return this.request({
      url: `/api/report/send?mobile=${mobile}`,
    })
  }
  getByIdCard(id_card,mobile,code) {
    return this.request({
      url: `/api/report/getByIdCard?id_card=${id_card}&mobile=${mobile}&code=${code}`,
    })
  }
  getRecruit() {
    return this.request({
      url: `/api/report/recruit`,
    })
  }
  getRecruits(page) {
    return this.request({
      url: `/api/report/recruitList?page=${page}`,
    })
  }
  getDetail(id,type) {
    return this.request({
      url: `/api/report/detail/${id}/${type}`,
    })
  }
  checkCode(mobile, code,id_card){
    return this.request({
      url: `/api/report/check?mobile=${mobile}&code=${code}&id_card=${id_card}`,
    })
  }
}
export {
  ReportModel
}